Skip to content

Conversation

shorea
Copy link
Contributor

@shorea shorea commented Sep 14, 2017

…temp fixes so PutObject will work

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why "dump"?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

toString was taken. I can rename it to toUtf8String and have a toString that takes a Charset though per your other suggestion.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I must be going crazy because I can't find that this method actually exists. http://docs.oracle.com/javase/8/docs/api/?java/io/ByteArrayOutputStream.html What am I missing?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found it!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to copyBytesFrom, or can we just use array since the output stream copies it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if we can assume it's backed by an array or that array constitutes the entire contents of the byte buffer.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I guess we would need to check if it hasArray and preserve the indices if we were to do it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because this is their data, we should probably make them define the encoding.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, I'll add that.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this fix all of the remaining empty-response integration test failures?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, should fix them.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this need to be varargs anymore? I only see one use. It could even be inlined?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nah I can inline it. Copied it from my other branch which removes some timeout handlers but didn't port that over.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Subsriber -> Subscriber (here and elsewhere). Will the subscriber be the customer's? Could it be beneficial to log which one?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes in this context it will be the customers subscriber. Were you thinking like a class name or something?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, a class name or just calling toString on it. We could implement useful toStrings for our internal implementations?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 for toString, I'll do that.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added.

@shorea shorea force-pushed the shorea-async-response-handler-string branch 3 times, most recently from b4d4bb5 to 1376635 Compare September 15, 2017 18:26
Copy link
Contributor

@millems millems Sep 15, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@param charset + other javadoc changes

Copy link
Contributor

@millems millems left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM other than the minor other comments.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

toString()?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

toString()?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's actually the subscriber we call toString on. Since the byte subscriber didn't have any identifying state I just left it as the default implementation. I can change it to whatever though, just let me know.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nah, it's aight.

@shorea shorea force-pushed the shorea-async-response-handler-string branch from 1376635 to bba549c Compare September 15, 2017 19:23
@shorea shorea force-pushed the shorea-async-response-handler-string branch from bba549c to 5ff3309 Compare September 15, 2017 19:26
@shorea shorea merged commit 0f6a19d into master Sep 15, 2017
@zoewangg zoewangg deleted the shorea-async-response-handler-string branch December 6, 2017 19:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants